home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Games Machine 76
/
XENIATGM66.iso
/
Indiana Jones
/
Indiana Jones.exe
/
RESOURCE
/
PREVIEW.GOB
/
cog_actor_kid.cog
< prev
next >
Wrap
Text File
|
1999-11-15
|
2KB
|
81 lines
# Jones 3D Cog Script
#
# actor_Kid.cog
#
# [RT]
#
# (C) 1999 LucasArts Entertainment Company LLC. All Rights Reserved
#
# ===================================================================
symbols
message created
message damaged
model head0=head_by_asound.3do local
model head1=head_by_amsound.3do local
model head2=head_by_osound.3do local
sound snd0=inxb001.wav local # "No shooting, please!"
sound snd1=inxb002.wav local # "Don't shoot...it's me, not a hyena."
sound snd2=inxb003.wav local # "Hey, that could hurt!"
sound snd3=inxb004.wav local # "Stop, or I refuse to help you!"
thing kid local
int newLine local
int lastLine=-1 local
int bTalking=0 local
end
# ===================================================================
code
created:
kid = GetSenderRef();
SetThingVoiceHeads(kid, "byhead", "", "head_by_asound.3do", "head_by_amsound.3do", "head_by_osound.3do");
return;
# -------------------------------------------------------------------
damaged:
if (GetThingParent(GetSourceRef()) != GetLocalPlayerThing()) return;
if (bTalking) return;
bTalking = 1;
kid = GetSenderRef();
# Impact damage
if (BitTest(GetParam(1), 0x1))
{
while (newLine == lastLine)
{
newLine = RandBetween(0, 3);
}
}
# Anything else
else
{
while (newLine == lastLine)
{
newLine = RandBetween(2, 3);
}
}
# Start the voice & wait...
PlayVoice(kid, snd0[newLine], 1.0, 1);
bTalking = 0;
lastLine = newLine;
return;
end